<%@page import="systems.AdsSystem"%>
<%@page import="helpers.NumberHelper"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="helpers.DateHelper"%>
<%@page import="entities.Domain"%>
<%
Domain domain = (Domain) request.getAttribute("domain");

//Set content for Seo
String title = "Check web safe of website " + domain.getDomain() + " - checkwebsafe.com";
String description = "Tools check " + domain.getDomain() + " is safe. Security for website as check norton, mcafee safe, web of trust rating and google safe browsing Diagnostic.We help you check link for safety and have some informations about site as Safe Web Review, Traffic Reviews.";

String keywords = domain.getDomain() + ", free " + domain.getDomain() + " protection, norton website checker, " + domain.getDomain() + " security, norton site check, norton safe site, mcafee safe, web protection";

String url = UrlHelper.getServerUrl(request) + "/www/" + domain.getDomain();
String ogimage = "http://immediatenet.com/t/t_a?Size=1024x768&URL=" + domain.getDomain();
%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
    <jsp:param name="ogurl" value="<%=url %>" />
    <jsp:param name="ogimage" value="<%=ogimage %>" />
    <jsp:param name="ogdescription" value="<%=description%>" />
</jsp:include>
<script src="/js/jquery.knob.js" type="text/javascript"></script>
<script>
   $(function() {
       
       $(".redCircle").knob({
           'min':0,
           'max':100,
           'readOnly': true,
           'width': 200,
           'height': 200,
           'fgColor': '#FA603D',
           'dynamicDraw': true,
           'thickness': 0.2,
           'tickColorizeValues': true,
   		'data-skin':'tron'
       });
       
       $(".redCircle").css("color", "#FA603D");
   });
 </script>
		<h3>
			<img src="http://www.google.com/s2/favicons?domain=<%=domain.getDomain() %>">
			<a href="/out/<%=domain.getDomain()%>"><%=domain.getDomain() %></a>
		</h3>
		<div class="adv top-right">
			<%=AdsSystem.getAds468x60() %>
		</div>
		
		
		<section class="safety-review">
    		<div class="row-fluid">
    			<div class="span7">
					<div class="row-fluid section-header">
						<div class="content-box">
							<div class="content-box-header">
								<i class="icon-time"></i> CheckSafeWeb Review safety
							</div>

							<table class="table table-striped">
								<tbody>
									<tr>
										<td><i class="icon-info-sign" /> Report</td>
										<td class="center">
											<%=DateHelper.getStringFromDate(domain.getCreated(), "dd-MM-yyyy hh:mm:ss")  %> &nbsp;
											<% if (!DateHelper.checkGreaterNow(domain.getUpdated(), 1440)) { %> 
					                        	<a href="/www/<%=domain.getDomain() %>?update=<%=domain.getAuthKey() %>" class="update-data" rel="nofollow">(rescan)</a>
					                        <% } %>
					                    </td>
									</tr>
									<tr>
										<td><i class="icon-info-sign"></i> Domain</td>
										<td class="center"><%=domain.getDomain()  %></td>
									</tr>
									<tr>
										<td><i class="icon-info-sign" /> Ip Address</td>
										<td class="center"><%=domain.getIp()  %></td>
									</tr>
									<tr>
										<td><i class="icon-info-sign" /> Alexa Rank</td>
										<td class="center"><%=domain.getAlexaRank() %></td>
									</tr>
									<tr>
										<td><i class="icon-info-sign" /> Google Page Rank</td>
										<td class="center"><img src="../images/pr_<%=!domain.getGoogleRank().isEmpty() ? domain.getGoogleRank() : "0"  %>.gif" alt="PR <%=domain.getGoogleRank()  %>"></td>
									</tr>
									<tr>
										<td><i class="sprite ico-safesite-reviews"></i> Safe Web Review</td>
										<td class="center">
											<% if (domain.getGoogleSafebrowsing().equalsIgnoreCase("safe")) { %>
											<i class="icon-ok-sign" title="<%=domain.getGoogleSafebrowsing()%>"></i>
											<% } else { %>
											<i class="icon-question-sign" title="<%=domain.getGoogleSafebrowsing()%>"></i>
											<% } %>
										</td>
									</tr>
									<tr>
										<td><i class="sprite ico-google-safe"></i> Google Safebrowsing </td>
										<td class="center">
											<% if (domain.getGoogleSafebrowsing().equalsIgnoreCase("safe")) { %>
											<i class="icon-ok-sign" title="<%=domain.getGoogleSafebrowsing()%>"></i>
											<% } else { %>
											<i class="icon-question-sign" title="<%=domain.getGoogleSafebrowsing()%>"></i>
											<% } %>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
				</div>
    			<div class="mark-review span5">
			        <div>
			        	<div class="content-box">
							<div class="content-box-header">
								<i class="icon-time"></i> Check Safe Web Review
							</div>
	                    	<div class="circleStatsItem red">
	                    		<%
								String color = "green";
								
								int rating = NumberHelper.getRandomNumberFrom(40, 100);
								
								try{
									rating = Integer.parseInt(domain.getRating());
								} catch(Exception e){}
								
								if (rating < 40) {
									color = "red";
								} else if (rating < 60){
									color = "yellow";
								} else if (rating < 80){ 
									color = "grey";
								}
								%>
	                    		<i class="icon-thumbs-up"></i>
								<span class="percent">%</span>
	                        	<input type="text" value="<%=rating %>" class="redCircle" />
	                    	</div>
	                    </div>
					</div>
			    </div>
    		</div>
    		
    	</section>
		<br />
		<div class="adv">
    		<%=AdsSystem.getAds728x90() %>
    	</div>
		
		<br />
		
		<!-- WOT -->
    	<section>
			<div class="row-fluid">
				<div class="span5">
					<div class="content-box">
						<h6 class="content-box-header">
							<i class="icon-star icon-white"></i> Web of Trust (WOT) Ratings
						</h6>
						<div class="wot-content" id="checkSafeSiteNortonSafeWeb">
							<%=domain.getWotContent() %>
						</div>
					</div>
				</div>
				<div class="span7">
					<div class="content-box">
						<h6 class="content-box-header">
							How to read the rating bar?
						</h6>
						<div class="padded">
							<p>Reputation ratings are based on real user experiences from
								millions of WOT users.</p>

							<ul id="scorecard-explanation">
								<li><strong>Trustworthiness</strong> indicates the general
									level of trust that the users have towards a web site.</li>
								<li><strong>Vendor reliability</strong> shows the level of
									trust for business transactions on a website, especially in
									e-commerce.</li>
								<li><strong>Privacy</strong> measures the level of trust
									for protecting users’ privacy.</li>
								<li><strong>Child safety</strong> signals the level of
									trust for the site’s suitability for children.</li>
							</ul>
							<br>
							
							<p>How to read the rating bar?</p>
							<p>
								<img src="/images/rating_explanation.png">
							</p>

							<p>
								Confidence (e.g <img border="0" src="/images/confidence-3.png"
									alt="">) indicates the amount of supporting evidence that
								the WOT system has for the reputation rating.
							</p>
						</div>
				</div>
			</div>
		</section>
		<!-- WOT END -->
		
		<br />
		<div class="adv">
    		<%=AdsSystem.getAds728x90() %>
    	</div>
		
		<br />
		
		<!-- Google Safe Review BEGIN -->
		<section>
			<div class="row-fluid">
				<div class="span12">
					<div class="content-box">
						<h6 class="content-box-header">
							<i class="icon-medkit icon-white"> </i> Google safe browsing Diagnostic
						</h6>
						<div class="wot-content">
							<%=domain.getGoogleSafeContent() %>
						</div>
					</div>
				</div>
			</div>
		</section>
		
		<!-- Google Safe Review END -->	
		
		<br />
		
		<!-- Norton AND McAffee Safe Review BEGIN -->
		<section>
			<div class="row-fluid">
				<div class="span6">
					<div class="content-box">
						<h6 class="content-box-header">
							<i class="icon-medkit icon-white"></i> McAfee Safe Diagnostic
						</h6>
						<div class="padded mcafee-safe-content">
							<%=domain.getMcAfeeSafeContent() %>
						</div>
					</div>
				</div>
				<div class="span6">
					<div class="content-box">
						<h6 class="content-box-header">
							<i class="icon-medkit icon-white"></i> Norton Safe Web Threat Report
						</h6>
						<div class="padded mcafee-safe-content" id="checkSafeSiteNortonSafeWeb">
							<%=domain.getNortonSafeContent() %>
						</div>
					</div>
				</div>
			</div>
		</section>
		<!-- Norton AND McAffee Safe Review BEGIN -->
		
		<br />
		
		<!-- Traffic Review BEGIN -->
		<section>
			<div class="row-fluid">
				<div class="span12">
					<div class="content-box">
						<h6 class="content-box-header">
							<i class="icon-comment icon-white"></i> Traffic Reviews
						</h6>
						<div class="row-fluid f-info">
							<div class="span8">
								<h6>Magestic Backlinks</h6>
								<img src="http://www.majesticseo.com/charts/backlinks-discovery-chart/<%=domain.getDomain() %>?w=677&amp;h=200&amp;IndexDataSource=F">
							</div>
							<div class="span4">
								<h6>Daily Ranks</h6>
								<img src="http://traffic.alexa.com/graph?c=1&amp;u=<%=domain.getDomain() %>&amp;r=6m&amp;y=t&amp;z=3&amp;h=200&amp;w=280&amp;b=FFFFFF">
							</div>
						</div>
			        	<div class="row-fluid f-info">
							<div class="span4">
								<h6>Rank Trend</h6>
								<img src="http://traffic.alexa.com/graph?&amp;w=295&amp;h=200&amp;o=f&amp;c=1&amp;y=t&amp;b=ffffff&amp;r=4y&amp;u=<%=domain.getDomain() %>">
							</div>
							<div class="span4">
								<h6>Visitor Trend</h6>
								<img src="http://grapher.compete.com/<%=domain.getDomain() %>_uv_310.png">
							</div>
							<div class="span4">
								<h6>Bounce Trend</h6>
								<img src="http://traffic.alexa.com/graph?&amp;w=295&amp;h=200&amp;o=f&amp;c=1&amp;y=b&amp;b=ffffff&amp;r=4y&amp;u=<%=domain.getDomain() %>">
							</div>
						</div>
					</div>
				</div>
			</div>
		</section>
		<!-- Traffic Review END -->
		<br />
		
		<jsp:include page="/elements/list_domain.jsp" />

<jsp:include page="/layouts/footer.jsp" />